'''
Copyright 2010 Indra Bagus <indra.bagus@gmail.com> 
    
Licensed under the Apache License, Version 2.0 (the "License"); 
you may not use this file except in compliance with the License. 
You may obtain a copy of the License at 

    http://www.apache.org/licenses/LICENSE-2.0 
    
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, 
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. 
'''

from Type import WmxDictionaryValue, WmxIntegerValue
from Dictionary import DLMAPDict



class DLMapIE(object):
    def __init__(self):
        self.diuc = int()


    
class DLMapIEBurstProfiles(DLMapIE):
    def __init__(self):
        super(DLMapIEBurstProfiles,self).__init__()
        self.cid_list = []
        self.ofdma_symbol_offset = int()
        self.subchannel_offset = int()
        self.boosting = WmxDictionaryValue(DLMAPDict.boosting)
        self.num_ofdma_symbols = int()
        self.num_subchannels = int()
        self.repet_coding_ind = WmxDictionaryValue(DLMAPDict.repet_coding_ind) 
        


class DLMapIEExtended(DLMapIE):
    def __init__(self):
        super(DLMapIEExtended,self).__init__()
        self.ext_diuc = WmxIntegerValue()
        self.length = int()


        
class DLMapIECIDSwitch(DLMapIEExtended):
    def __init__(self):
        super(DLMapIECIDSwitch,self).__init__()
        
        

class DLMapIEChannelMeasurement(DLMapIEExtended):
    def __init__(self):
        super(DLMapIEChannelMeasurement,self).__init__()
        self.channel_nr = int()
        self.ofdma_symbol_offset = int()
        self.cid = int()
        

        
class DLMapIE_STC_DLZone(DLMapIEExtended):
    def __init__(self):
        super(DLMapIE_STC_DLZone,self).__init__()
        self.ofdma_symbol_offset    = WmxIntegerValue()
        self.permutation            = WmxIntegerValue()
        self.use_all_sc             = WmxIntegerValue()
        self.stc                    = WmxIntegerValue()
        self.matrix_ind             = WmxIntegerValue()
        self.dl_permbase            = WmxIntegerValue()
        self.prbs_id                = WmxIntegerValue()
        self.amc_type               = WmxIntegerValue()
        self.midamble_presence      = WmxIntegerValue()
        self.midamble_boosting      = WmxIntegerValue()
        self.antennas_2_3_select    = WmxIntegerValue()
        self.dedicated_pilots       = WmxIntegerValue()
        self.reserved               = WmxIntegerValue()



class DLMapIE_AAS_DL(DLMapIEExtended):
    def __init__(self):
        super(DLMapIE_AAS_DL,self).__init__()
        self.ofdma_symbol_offset    = WmxIntegerValue()
        self.permutation            = WmxIntegerValue()
        self.dl_permbase            = WmxIntegerValue()
        self.dl_preamble_config     = WmxIntegerValue()
        self.preamble_type          = WmxIntegerValue()
        self.prbs_id                = WmxIntegerValue()
        self.diversity_map          = WmxIntegerValue()
        self.reserved               = WmxIntegerValue()

        
        
class DLMapIEDataLocAnotherBS(DLMapIEExtended):
    def __init__(self):
        super(DLMapIEDataLocAnotherBS,self).__init__()
        self.segment                = WmxIntegerValue()
        self.used_subchannels       = WmxIntegerValue()
        self.diuc                   = WmxIntegerValue()
        self.frame_advance          = WmxIntegerValue()
        self.reserved               = WmxIntegerValue()
        self.ofdma_symbol_offset    = WmxIntegerValue()
        self.subchannel_offset      = WmxIntegerValue()
        self.boosting               = WmxIntegerValue()
        self.preamble_index         = WmxIntegerValue()
        self.no_ofdm_symbols        = WmxIntegerValue()
        self.no_subchannels         = WmxIntegerValue()
        self.repet_coding_ind       = WmxIntegerValue()
        self.cid                    = WmxIntegerValue()
        

        
class DLMapIEPhysicalModifier(DLMapIEExtended):
    def __init__(self):
        super(DLMapIEPhysicalModifier,self).__init__()
        self.preamble_modifier_type         = WmxIntegerValue()
        self.preamble_frequency_shift_index = WmxIntegerValue()
        self.preamble_time_shift_index      = WmxIntegerValue()
        self.pilot_pattern_modifier         = WmxIntegerValue()
        self.pilot_pattern_index            = WmxIntegerValue()
        
        

class DLMapIEBroadcastCtrlPointer(DLMapIEExtended):
    def __init__(self):
        super(DLMapIEBroadcastCtrlPointer,self).__init__()
        self.dcd_ucd_trans_frame                = WmxIntegerValue()
        self.skip_broadcast_sys_update          = WmxIntegerValue()
        self.broadcast_sys_update_type          = WmxIntegerValue()
        self.broadcast_sys_update_trans_frame   = WmxIntegerValue()
        

